package com.lingyu.jsjx.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 社会服务档案对象 jsjx_social_service
 *
 * @author ruoyi
 * @date 2025-08-08
 */
@Data
@TableName("jsjx_social_service")
public class SocialService extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 服务记录ID
     */
    @TableId(type = IdType.AUTO, value = "service_id")
    private Long serviceId;

    /**
     * 服务标题
     */
    @Excel(name = "服务标题")
    private String title;

    /**
     * 服务类型
     */
    private Long serviceTypeId;

    @Excel(name = "服务类型")
    private String serviceTypeName;

    /**
     * 服务对象id（下拉选择）
     */
    private Long targetGroupId;

    /**
     * 服务对象name（下拉选择）
     */
    @Excel(name = "服务对象")
    private String targetGroupName;

    /**
     * 负责人
     */
    @Excel(name = "负责人")
    private String director;

    /**
     * 服务开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 服务结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 成员名单（可存储JSON或逗号分隔）
     */
    @Excel(name = "成员名单")
    private String members;

    /**
     * 成果形式id（下拉选择）
     */
    private Long resultTypeId;

    /**
     * 成果形式name（下拉选择）
     */
    @Excel(name = "成果形式")
    private String resultTypeName;

    /**
     * 服务地点
     */
    @Excel(name = "服务地点")
    private String location;

    /**
     * 受益人数
     */
    @Excel(name = "受益人数")
    private Long beneficiaryCount;

    /**
     * 服务时长
     */
    @Excel(name = "服务时长")
    private String duration;

    /**
     * 经济效益描述
     */
    @Excel(name = "经济效益描述")
    private String economicBenefit;

    /**
     * 成果附件路径
     */
    private String attachmentFileId;

    /**
     * 内容描述（200字以内）
     */
    @Excel(name = "内容描述", readConverterExp = "2=00字以内")
    private String contentDescription;

    /**
     * 技术方案摘要（200字以内）
     */
    @Excel(name = "技术方案摘要", readConverterExp = "2=00字以内")
    private String technicalSummary;

    @TableField(exist = false)
    private List<FileInfo> attachmentFileList;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("serviceId", getServiceId())
                .append("title", getTitle())
                .append("serviceTypeId", getServiceTypeId())
                .append("serviceTypeName", getServiceTypeName())
                .append("targetGroupId", getTargetGroupId())
                .append("targetGroupName", getTargetGroupName())
                .append("director", getDirector())
                .append("startDate", getStartDate())
                .append("endDate", getEndDate())
                .append("members", getMembers())
                .append("resultTypeId", getResultTypeId())
                .append("resultTypeName", getResultTypeName())
                .append("location", getLocation())
                .append("beneficiaryCount", getBeneficiaryCount())
                .append("duration", getDuration())
                .append("economicBenefit", getEconomicBenefit())
                .append("attachmentFileId", getAttachmentFileId())
                .append("contentDescription", getContentDescription())
                .append("technicalSummary", getTechnicalSummary())
                .append("createBy", getCreateBy())
                .append("createByName", getCreateByName())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateByName", getUpdateByName())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
